{messages block='gallery'}
<table style="width: 100%;" cellpadding="4" cellspacing="0">
    <tr>
        <td class="border2">
            <table style="width: 100%;cursor:pointer;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0" onclick="SwitchMenu('gall1','galltext1')">
                <tr>
                    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
                    <td class="block_header">{language text="browse"}</td>
                    <td style="text-align:right;padding-right:4px;"><span class="cur" id="galltext1">[-]</span></td>
                </tr>
            </table>
            <table style="width:100%;" cellspacing="1" cellpadding="1" id="gall1">
                <tr>
                    <td width="10"></td>
                    <td>
<div class="submenu">
<br/>
<div id="formhide1">
<form method="post" action="{url link='current'}" style="margin:0px;">
<table style="width:100%;" cellspacing="0" cellpadding="0">
<tr>
<td style="font-size:8pt;width:70%;vertical-align:top;" class="color">

<table style="width:100%;" cellspacing="0" cellpadding="4">
<tr>
<td style="width:35%;font-size:8pt;text-align:right;" class="color">
{language text="order_by"} :
</td>
<td style="width:75%;font-size:8pt;" class="color">
<select name="field">
<option value="time"{if $sSort == 'time'} selected="selected"{/if}>{language text="time"}</option>
{if !getParam('section_rate')}
<option value="rating"{if $sSort == 'rating'} selected="selected"{/if}>{language text="top_rated"}</option>
{/if}
<option value="view"{if $sSort == 'view'} selected="selected"{/if}>{language text="most_viewed"}</option>
</select>
</td>
</tr>
<tr>
<td style="width:35%;font-size:8pt;text-align:right;" class="color">
{language text="display_mode"}:
</td>
<td style="width:75%;font-size:8pt;" class="color">
<select name="display">
<option value="1"{if $aForm.display == 1} selected="selected"{/if}>{language text="thumbnail"}</option>
<option value="2"{if $aForm.display == 2} selected="selected"{/if}>{language text="list"}</option>
<option value="3"{if $aForm.display == 3} selected="selected"{/if}>{language text="infopic"}</option>
</select>

/
<select name="pagesize">
<option value="6"{if $aForm.pagesize == 6} selected="selected"{/if}>{language text="6_per_page"}</option>
<option value="12"{if $aForm.pagesize == 12} selected="selected"{/if}>{language text="12_per_page"}</option>
<option value="24"{if $aForm.pagesize == 24} selected="selected"{/if}>{language text="24_per_page"}</option>
</select>
</td>
</tr>
<tr>
<td style="width:35%;font-size:8pt;text-align:right;" class="color">
{language text="view_mode"}:
</td>
<td style="width:75%;font-size:8pt;" class="color">
<select name="mode">
<option value="1"{if $aForm.mode == 1} selected="selected"{/if}>{language text="site_viewer"}</option>
<option value="2"{if $aForm.mode == 2} selected="selected"{/if}>{language text="profile_viewer"}</option>
</select>
</td>
</tr>
</table>

</td><td style="font-size:7pt;width:30%;vertical-align:middle;text-align:center;" class="color">
<input type="submit" value="{language text="apply_browse_settings"}" class="mainmenu6" onclick="document.getElementById('formhide1').style.display='none';document.getElementById('formhide2').style.display='';" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" />

<br /><br />

</td>
</tr>
</table>

</form>
<br/>
</div>

<div style="text-align:center;display:none;" id="formhide2">
<table style="margin-left:auto;margin-right:auto;">
<tr>
<td style="font-size:10pt;" class="color">
<b>{language text="updating_browse_settings"}</b>
</td>
<td>
<table class="pbar3" cellpadding="0" cellspacing="0">
<tr>
<td>
<span id="progress1">&nbsp; &nbsp;</span>
<span id="progress2">&nbsp; &nbsp;</span>
<span id="progress3">&nbsp; &nbsp;</span>
<span id="progress4">&nbsp; &nbsp;</span>
<span id="progress5">&nbsp; &nbsp;</span>
<span id="progress6">&nbsp; &nbsp;</span>
<span id="progress7">&nbsp; &nbsp;</span>
<span id="progress8">&nbsp; &nbsp;</span>
<span id="progress9">&nbsp; &nbsp;</span>
<span id="progress10">&nbsp; &nbsp;</span>
<span id="progress11">&nbsp; &nbsp;</span>
</td></tr></table>
</td></tr></table>
<script type="text/javascript">do_prog(11,200);</script>
<br />
</div>
</div>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<br />
{if $iCnt}
<div style="font-size:9pt;">
	{str_replace text="`viewing_ifrom_ito_out_of_icnt_image`" iFrom="`$iFrom`" iTo="`$iTo`" iCnt="`$iCnt`" }
</div>
{/if}
{include file="$sRootPath/_blocks/pager_nav_button.html"}
{if count($aItems)}
<!-- START IMAGES -->
<table style="width:100%;" cellpadding="4" cellspacing="0">
{if $aForm.display == 1}
<tr>
{/if}
{foreach from=$aItems key=key item=aItem name=aitems}
{if $aForm.display|default:"1" == 1}
<td style="text-align:center;vertical-align:middle;">
<table style="margin-left:auto;margin-right:auto;"><tr><td style="font-size:8pt;" class="color">
{$aItem.text|truncate:40|wordfilter|process_code}
<table style="margin-left:auto;margin-right:auto;"><tr><td>

<a href="{if $aForm.mode == 1}{url link='public.gallery.view' id=$aItem.id field=$sSort foxseotitle=$aItem.text}{else}{url link='public.user.gallery' name=$aItem.user}{/if}">
{img src="`$sImagePath`thumb/`$aItem.id`.jpg" alt="" src_def="design/pic/noimage_120.jpg"}
</a>

</td>
</tr>
</table>
{if $bAdmin || $bStaff}
  <div>
    <a class="link_action" href="{url link='current' delete=$aItem.id}" onclick="return confirm('{language text="do_you_really_want_to_delete_this_i"}');">[ {language text="delete"} ]</a>
    {if $aItem.feature == 1}<a class="link_action" href="{url link='current' removefeature=$aItem.id}">[ {language text="unmake_featured"} ]</a>{else}<a class="link_action" href="{url link='current' makefeature=$aItem.id}">[ {language text="make_featured_763"} ]</a>{/if}
  </div>
{/if}
</td>
</tr>
</table></td>
{if $key % 3 == 2}
</tr>
<tr{if $key % 3 == 0} class="border13"{/if}>
{if $smarty.foreach.aitems.last == true}
<td></td>
{/if}
{/if}
{elseif $aForm.display == 2}
<tr{if $key % 3 == 0} class="border13"{/if}>
<td style="text-align:left;vertical-align:middle;" onmouseover="this.className='border14';" onmouseout="this.className='';">
<table style="width:100%;"><tr><td style="width:60%;font-size:8pt;" class="color">
<a href="{url link='public.gallery.view' id=$aItem.id field=$sSort foxseotitle=$aItem.text}">
{if !$aItem.text}{language text='Mod_Site.untitled'}{else}{$aItem.text|truncate:40|wordfilter|escape}{/if}</a> {language text="by_397"} <a href="{url link='public.user' name=$aItem.user}">
{$aItem.user}</a>
</td><td style="width:20%;font-size:8pt;" class="color"> {$aItem.gcatagory} </td>
<td style="width:20%;font-size:8pt;" class="color"> {$aItem.time|date_format:$sMonthDateFormat} </td>
</tr></table>
</td></tr>
{elseif $aForm.display == 3}
<tr {if $key % 3 == 0}class="border13"{/if}>
<td style="text-align:left;vertical-align:middle;">
<table style="width:100%;"><tr><td style="width:30%;text-align:center;">
	<a href="{if $aForm.mode == 1}{url link='public.gallery.view' id=$aItem.id field=$sSort foxseotitle=$aItem.text}{else}{url link='public.user.gallery' name=$aItem.user}{/if}">
                {img src="`$sImagePath`thumb/`$aItem.id`.jpg"  alt="" src_def="design/pic/noimage_120.jpg"}
	</a>
</td><td style="width:70%;vertical-align:top;font-size:8pt;" class="color">
<b>{language text="posted_by_604"}</b>: <a href="{url link='public.user' name=$aItem.user}">
{$aItem.user}</a>
 <br />
<div style="padding-top:4px;"><b>{language text="title"}</b>: {if !$aItem.text}{language text='Mod_Site.untitled'}{else}{$aItem.text|truncate:40|wordfilter|escape}{/if} </div>
<div style="padding-top:4px;"><b>{language text="views"}</b>: {$aItem.view} </div>
<div style="padding-top:4px;"><b>{language text="comments_67"}</b>: {$aItem.comment} </div>
<div style="padding-top:4px;"><b>{language text="image_url_location"}</b>: <div style="padding:4px;"><input type="text" size="70" name="url" value="{$sImagePath}{$aItem.id}.jpg" /></div></div>
</td></tr></table>
</td></tr>
{/if}
{/foreach}
{if $aForm.display == 1}
</tr>
{/if}
</table>
<!-- START IMAGES -->
{else}
<div class="message_info">{language text="no_items_were_found"}</div>
{/if}

{include file="$sRootPath/_blocks/pager_nav_button.html"}
<br />
<br />
{Tag::List type='gallery'}